<title>model</title>
<div class="layui-fluid">
    <div class="layui-col-md12">
        <form class="layui-form layui-col-md11">
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input name="searchName" placeholder="请输入名称" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-input-inline">
                    <a class="layui-btn" lay-submit lay-filter="find">查询</a>
                </div>
            </div>
        </form>
        <a class="layui-btn layui-col-md1" lay-submit lay-filter="showAdd">新增</a>
    </div>
    <!--弹出层-->
    <form class="layui-form" style='display:none;' id="add_edit_form">
        <div class="layui-form-item">
            <label class="layui-form-label">分组名称</label>
            <div class="layui-input-inline">
                <input name="name" required lay-verify="required" placeholder="请输入分组名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">英文名称</label>
            <div class="layui-input-inline">
                <input name="english_name" required lay-verify="required" placeholder="请输入英文名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input name="sort" placeholder="请输入排序" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">表格属性</label>
            <div class="layui-input-inline">
                <select name="type" required lay-verify="required" id="type">
                    <option value="0">普通分组</option>
                    <option value="1">表格分组</option>
                    <option value="2">图片分组</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" checked lay-skin="switch" lay-text="开启|关闭">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <a class="layui-btn" id="btn" lay-submit lay-filter="sub">提交</a>
            </div>
        </div>
    </form>
    <!--数据表格-->
    <div class="layui-col-md12">
        <table id="pageTable" lay-filter="pageTable" lay-data="{id: 'pageTable'}">
        </table>
    </div>
</div>
<!--添加/编辑签名-->
<script type="text/javascript">
    layui.use('set/printingGroup', layui.factory('set/printingGroup'));
</script>
<script type="text/html" id="operations">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
</script>
<!--用途模板-->
<script type="text/html" id="purposeTpl">
    {{#  if(d.purpose == 'order'){ }}
    <span class="layui-col-md8">同步模板</span>
    {{#  } else if(d.purpose == 'message'){ }}
    <span class="layui-col-md8">消息模板</span>
    {{#  } else { }}
    <span class="layui-col-md8">类型错误</span>
    {{#  } }}
</script>
<!--状态码模板-->
<script type="text/html" id="statusTpl">
    <input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="开启|关闭" lay-filter="status" {{
           d.status== 1 ? 'checked' : '' }}>
</script>
<style>
    /*列表展示图片时需要添加*/
    .layui-table-cell {
        height: auto;
    }

    #add_edit_form {
        margin-top: 20px;
        margin-right: 20px;
    }

    #image {
        height: 200px;
        width: 200px;
        margin-top: 10px;
        border: 1px solid #e5e5e5;
    }

    input[id=addImgPut] {
        border: 0px solid red;
        position: absolute;
        left: 0px;
        top: 0px;
        opacity: 0;
        height: 36px;
        width: 200px;
    }

    input[id=addImgPut] :hover {
        cursor: pointer;
    }
    .is-display{display: none;}
    .background-color{background-color:#F2F2F2 ;margin-left: 2.5rem; width: 16.25rem;overflow:auto;height: 12.5rem;border-radius: 0.3125rem;padding: 0.625rem 0;}
    .background-color li input{display: block !important;}
    .margin-left{margin-left: 0.625rem;height: 1.875rem;line-height: 1.875rem;}
    .margin-left:hover{background-color: white;}
    .margin-left input{float: left;margin-top:0.625rem;margin-left: 0.625rem;}
    .margin-left label{margin-left: 0.3125rem;}
</style>
